<template>
  <div class="handicp-page">
    <div class="header-box">
      <div class="left-bar">
        <img class="handicp-icon" src="../../../../public/icon/handicp1.png" alt="盘口切换" />
        <img class="handicp-icon" src="../../../../public/icon/handicp2.png" alt="盘口切换" />
        <img class="handicp-icon" src="../../../../public/icon/handicp3.png" alt="盘口切换" />
      </div>
      <div class="righet-switch">
        0未小数
        <i class="el-icon-caret-bottom icon"></i>
        <ul class="list-bar">
          <li class="list">0位小数</li>
          <li class="list">1位小数</li>
          <li class="list">4位小数</li>
          <li class="list">8位小数</li>
        </ul>
      </div>
    </div>
    <div class="type-box">
      <div class="list-col price">价格(BTC)</div>
      <div class="list-col count">数量(USDT)</div>
      <div class="list-col total">累计(USDT)</div>
    </div>
    <GeminiScrollbar class="table-body">
      <div class="buy-box">
        <HandicapList v-for="(item,index) in dataList.buy" :key="index" :item="item" :type="1"></HandicapList>
      </div>
      <div class="sell-box">
        <HandicapList v-for="(item,index) in dataList.sell" :key="index" :item="item" :type="2"></HandicapList>
      </div>
    </GeminiScrollbar>
  </div>
</template>

<script>
import HandicapList from "./list-handicp";
export default {
  data() {
    return {
      dataList: {
        buy: [
          {
            PairName: "BTc/USDT",
            Count: 26,
            Total: 96,
            Price:69,
          },
          {
            PairName: "BTc/USDT",
            Count: 26,
               Price:69,
            Total: 96
          },
          {
            PairName: "BTc/USDT",
            Count: 26,
               Price:69,
            Total: 96
          },
          {
            PairName: "BTc/USDT",
            Count: 26,
               Price:69,
            Total: 96
          },
          {
            PairName: "BTc/USDT",
            Count: 26,
               Price:69,
            Total: 96
          },
          {
            PairName: "BTc/USDT",
            Count: 26,
               Price:69,
            Total: 96
          }
        ],
        sell: [
          {
            PairName: "BTc/USDT",
            Count: 26,
               Price:69,
            Total: 96
          },
          {
            PairName: "BTc/USDT",
            Count: 26,
               Price:69,
            Total: 96
          },
          {
            PairName: "BTc/USDT",
            Count: 26,
               Price:69,
            Total: 96
          },
          {
            PairName: "BTc/USDT",
            Count: 26,
               Price:69,
            Total: 96
          },
          {
            PairName: "BTc/USDT",
            Count: 26,
               Price:69,
            Total: 96
          },
          {
            PairName: "BTc/USDT",
            Count: 26,
               Price:69,
            Total: 96
          },
          {
            PairName: "BTc/USDT",
            Count: 26,
             Price:69,
            Total: 96
          }
        ]
      }
    };
  },
  components: {
    HandicapList
  }
};
</script>

<style lang="less" scoerd>
.handicp-page {
  width: 100%;
  height: 100%;
  padding: 0 4px;
  background-color: #05193d;
  font-size: 12px;

  .header-box {
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    .handicp-icon {
      width: 18px;
      height: 18px;
      margin-right: 3px;
      cursor: pointer;
      border-bottom: solid 1px hsla(0, 8%, 41%, 0.8);
    }
    .righet-switch {
      color: hsla(0, 0%, 100%, 0.6);
      position: relative;
      cursor: pointer;
      line-height: 18px;
      .icon {
        position: relative;
        top: 1px;
        transition: all 0.3s;
      }
      .list-bar {
        position: absolute;
        background-color: #1b3157;
        border-radius: 4px;
        overflow: hidden;
        top: 18px;
        right: 3px;
        height: 0px;
        .list {
          line-height: 20px;
          padding: 0 10px;
          white-space: nowrap;
        }
        .list:hover {
          background-color: #334564;
        }
      }
    }
    .righet-switch:hover {
      .icon {
        transform: rotate(180deg);
      }
      .list-bar {
        height: auto;
      }
    }
  }
  .type-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 30px;
    color: #ffffff;
    border-top: solid 1px hsla(0, 8%, 41%, 0.8);
    border-bottom: solid 1px hsla(0, 8%, 41%, 0.8);
  }
  .table-body {
    height:785px;
    overflow-y: scroll;
    width: 250px;
    display: flex;
    flex-direction: column;
    .buy-box{
        flex: 1;
    }
    .sell-box{
        flex: 1;
    }
  }
  .list-col,
  .table-body /deep/ .list-col {
    flex: 1;
    border: solid 1px red;
  }
}
</style>